package controleur;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFormattedTextField;

import model.Rules;

public class MaxLife implements ActionListener{
	@Override
	public void actionPerformed(ActionEvent e) {
		if (e.getSource().getClass() != JFormattedTextField.class)
			return;
		JFormattedTextField f = (JFormattedTextField) e.getSource();
		int i = Integer.parseInt(f.getText());
		Rules.setMaxLife(i);
	}
}
